<?php 
			$username = $_SESSION['username'];          	$query = "select * from user where username='$username'";         	$result = mysql_query($query);
			$show = mysql_fetch_array($result); 
			$gamecode = $show['gamecode'];
?>


<div id="navcontainer" align="right">    <ul>
	<?php if (empty($gamecode)) { echo '<li><a href="index.php?act=gamecode">Enter Friend Code</a></li>'; } else { echo '<li><a href="index.php?act=createroom">Create Match</a></li>'; } ?>      	<li><a href="index.php?showuser=<?php echo $show['userid']; ?>">View Profile</a></li>
		<li><a href="index.php?act=editprofile">Edit Profile</a></li>
		<li><a href="index.php?act=extras">Extra Goods</a></li>    </ul></div>
